<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {% load static %}
    <title>用户登录</title>
    <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=PT+Sans:400,700'>
    <link rel="stylesheet" href="{% static 'user/css/reset.css' %}">
    <link rel="stylesheet" href="{% static 'user/css/supersized.css' %}">
    <link rel="stylesheet" href="{% static 'user/css/style.css' %}">
</head>
<body>

<div class="page-container">
    <h1>登录</h1>
    <form action={% url 'user:login' %} method="post">
        {% csrf_token %}
        {% for field in login_form %}
            <div>
                {{ field }}
            </div>
        {% endfor %}
        <button type="submit">登录</button>
    </form>
     <button id="btn_register">注册</button>
     <div><span class="error_message">{{ error_message }}</span></div>
</div>

<script src="{% static 'user/js/jquery-1.8.2.min.js' %}"></script>
<script src="{% static 'user/js/supersized.3.2.7.min.js' %}"></script>
<script src="{% static 'user/js/supersized-init.js' %}"></script>
<script type="text/javascript">
    $("#btn_register").click(function () {
         window.location.href = "{%  url 'user:register' %}";
    });
</script>
</body>
</html>